3.66 \(\int (d+e x^n) (a+b x^n+c x^{2 n}) \, dx\)

Optimal. Leaf size=62 \[ \frac{x^{n+1} (a e+b d)}{n+1}+a d x+\frac{x^{2 n+1} (b e+c d)}{2 n+1}+\frac{c e x^{3 n+1}}{3 n+1} \]

[Out]

a*d*x + ((b*d + a*e)*x^(1 + n))/(1 + n) + ((c*d + b*e)*x^(1 + 2*n))/(1 + 2*n) + (c*e*x^(1 + 3*n))/(1 + 3*n)

________________________________________________________________________________________

Rubi [A]  time = 0.038973, antiderivative size = 62, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.045, Rules used = {1407} \[ \frac{x^{n+1} (a e+b d)}{n+1}+a d x+\frac{x^{2 n+1} (b e+c d)}{2 n+1}+\frac{c e x^{3 n+1}}{3 n+1} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x^n)*(a + b*x^n + c*x^(2*n)),x]

[Out]

a*d*x + ((b*d + a*e)*x^(1 + n))/(1 + n) + ((c*d + b*e)*x^(1 + 2*n))/(1 + 2*n) + (c*e*x^(1 + 3*n))/(1 + 3*n)

Rule 1407

Int[((d_) + (e_.)*(x_)^(n_))^(q_.)*((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_)), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x^n)^q*(a + b*x^n + c*x^(2*n)), x], x] /; FreeQ[{a, b, c, d, e, n}, x] && EqQ[n2, 2*n] && NeQ[b^2 -
4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[q, 0]

Rubi steps

\begin{align*} \int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right ) \, dx &=\int \left (a d+(b d+a e) x^n+(c d+b e) x^{2 n}+c e x^{3 n}\right ) \, dx\\ &=a d x+\frac{(b d+a e) x^{1+n}}{1+n}+\frac{(c d+b e) x^{1+2 n}}{1+2 n}+\frac{c e x^{1+3 n}}{1+3 n}\\ \end{align*}

Mathematica [A]  time = 0.147129, size = 57, normalized size = 0.92 \[ x \left (\frac{x^n (a e+b d)}{n+1}+a d+\frac{x^{2 n} (b e+c d)}{2 n+1}+\frac{c e x^{3 n}}{3 n+1}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x^n)*(a + b*x^n + c*x^(2*n)),x]

[Out]

x*(a*d + ((b*d + a*e)*x^n)/(1 + n) + ((c*d + b*e)*x^(2*n))/(1 + 2*n) + (c*e*x^(3*n))/(1 + 3*n))

________________________________________________________________________________________

Maple [A]  time = 0.01, size = 66, normalized size = 1.1 \begin{align*} adx+{\frac{ \left ( ae+bd \right ) x{{\rm e}^{n\ln \left ( x \right ) }}}{1+n}}+{\frac{ \left ( be+cd \right ) x \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{2}}{1+2\,n}}+{\frac{cex \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{3}}{1+3\,n}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d+e*x^n)*(a+b*x^n+c*x^(2*n)),x)

[Out]

a*d*x+(a*e+b*d)/(1+n)*x*exp(n*ln(x))+(b*e+c*d)/(1+2*n)*x*exp(n*ln(x))^2+c*e/(1+3*n)*x*exp(n*ln(x))^3

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^n)*(a+b*x^n+c*x^(2*n)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.43046, size = 315, normalized size = 5.08 \begin{align*} \frac{{\left (2 \, c e n^{2} + 3 \, c e n + c e\right )} x x^{3 \, n} +{\left (3 \,{\left (c d + b e\right )} n^{2} + c d + b e + 4 \,{\left (c d + b e\right )} n\right )} x x^{2 \, n} +{\left (6 \,{\left (b d + a e\right )} n^{2} + b d + a e + 5 \,{\left (b d + a e\right )} n\right )} x x^{n} +{\left (6 \, a d n^{3} + 11 \, a d n^{2} + 6 \, a d n + a d\right )} x}{6 \, n^{3} + 11 \, n^{2} + 6 \, n + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^n)*(a+b*x^n+c*x^(2*n)),x, algorithm="fricas")

[Out]

((2*c*e*n^2 + 3*c*e*n + c*e)*x*x^(3*n) + (3*(c*d + b*e)*n^2 + c*d + b*e + 4*(c*d + b*e)*n)*x*x^(2*n) + (6*(b*d
 + a*e)*n^2 + b*d + a*e + 5*(b*d + a*e)*n)*x*x^n + (6*a*d*n^3 + 11*a*d*n^2 + 6*a*d*n + a*d)*x)/(6*n^3 + 11*n^2
 + 6*n + 1)

________________________________________________________________________________________

Sympy [A]  time = 1.40157, size = 656, normalized size = 10.58 \begin{align*} \begin{cases} a d x + a e \log{\left (x \right )} + b d \log{\left (x \right )} - \frac{b e}{x} - \frac{c d}{x} - \frac{c e}{2 x^{2}} & \text{for}\: n = -1 \\a d x + 2 a e \sqrt{x} + 2 b d \sqrt{x} + b e \log{\left (x \right )} + c d \log{\left (x \right )} - \frac{2 c e}{\sqrt{x}} & \text{for}\: n = - \frac{1}{2} \\a d x + \frac{3 a e x^{\frac{2}{3}}}{2} + \frac{3 b d x^{\frac{2}{3}}}{2} + 3 b e \sqrt [3]{x} + 3 c d \sqrt [3]{x} + c e \log{\left (x \right )} & \text{for}\: n = - \frac{1}{3} \\\frac{6 a d n^{3} x}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{11 a d n^{2} x}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{6 a d n x}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{a d x}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{6 a e n^{2} x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{5 a e n x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{a e x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{6 b d n^{2} x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{5 b d n x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{b d x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{3 b e n^{2} x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{4 b e n x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{b e x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{3 c d n^{2} x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{4 c d n x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{c d x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{2 c e n^{2} x x^{3 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{3 c e n x x^{3 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac{c e x x^{3 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x**n)*(a+b*x**n+c*x**(2*n)),x)

[Out]

Piecewise((a*d*x + a*e*log(x) + b*d*log(x) - b*e/x - c*d/x - c*e/(2*x**2), Eq(n, -1)), (a*d*x + 2*a*e*sqrt(x)
+ 2*b*d*sqrt(x) + b*e*log(x) + c*d*log(x) - 2*c*e/sqrt(x), Eq(n, -1/2)), (a*d*x + 3*a*e*x**(2/3)/2 + 3*b*d*x**
(2/3)/2 + 3*b*e*x**(1/3) + 3*c*d*x**(1/3) + c*e*log(x), Eq(n, -1/3)), (6*a*d*n**3*x/(6*n**3 + 11*n**2 + 6*n +
1) + 11*a*d*n**2*x/(6*n**3 + 11*n**2 + 6*n + 1) + 6*a*d*n*x/(6*n**3 + 11*n**2 + 6*n + 1) + a*d*x/(6*n**3 + 11*
n**2 + 6*n + 1) + 6*a*e*n**2*x*x**n/(6*n**3 + 11*n**2 + 6*n + 1) + 5*a*e*n*x*x**n/(6*n**3 + 11*n**2 + 6*n + 1)
 + a*e*x*x**n/(6*n**3 + 11*n**2 + 6*n + 1) + 6*b*d*n**2*x*x**n/(6*n**3 + 11*n**2 + 6*n + 1) + 5*b*d*n*x*x**n/(
6*n**3 + 11*n**2 + 6*n + 1) + b*d*x*x**n/(6*n**3 + 11*n**2 + 6*n + 1) + 3*b*e*n**2*x*x**(2*n)/(6*n**3 + 11*n**
2 + 6*n + 1) + 4*b*e*n*x*x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) + b*e*x*x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) +
 3*c*d*n**2*x*x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) + 4*c*d*n*x*x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) + c*d*x*
x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) + 2*c*e*n**2*x*x**(3*n)/(6*n**3 + 11*n**2 + 6*n + 1) + 3*c*e*n*x*x**(3*n
)/(6*n**3 + 11*n**2 + 6*n + 1) + c*e*x*x**(3*n)/(6*n**3 + 11*n**2 + 6*n + 1), True))

________________________________________________________________________________________

Giac [B]  time = 1.13671, size = 279, normalized size = 4.5 \begin{align*} \frac{6 \, a d n^{3} x + 3 \, c d n^{2} x x^{2 \, n} + 6 \, b d n^{2} x x^{n} + 2 \, c n^{2} x x^{3 \, n} e + 3 \, b n^{2} x x^{2 \, n} e + 6 \, a n^{2} x x^{n} e + 11 \, a d n^{2} x + 4 \, c d n x x^{2 \, n} + 5 \, b d n x x^{n} + 3 \, c n x x^{3 \, n} e + 4 \, b n x x^{2 \, n} e + 5 \, a n x x^{n} e + 6 \, a d n x + c d x x^{2 \, n} + b d x x^{n} + c x x^{3 \, n} e + b x x^{2 \, n} e + a x x^{n} e + a d x}{6 \, n^{3} + 11 \, n^{2} + 6 \, n + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^n)*(a+b*x^n+c*x^(2*n)),x, algorithm="giac")

[Out]

(6*a*d*n^3*x + 3*c*d*n^2*x*x^(2*n) + 6*b*d*n^2*x*x^n + 2*c*n^2*x*x^(3*n)*e + 3*b*n^2*x*x^(2*n)*e + 6*a*n^2*x*x
^n*e + 11*a*d*n^2*x + 4*c*d*n*x*x^(2*n) + 5*b*d*n*x*x^n + 3*c*n*x*x^(3*n)*e + 4*b*n*x*x^(2*n)*e + 5*a*n*x*x^n*
e + 6*a*d*n*x + c*d*x*x^(2*n) + b*d*x*x^n + c*x*x^(3*n)*e + b*x*x^(2*n)*e + a*x*x^n*e + a*d*x)/(6*n^3 + 11*n^2
 + 6*n + 1)